package leetcode.string;

/**
 * @Description: https://leetcode.cn/problems/reverse-string/
 * @Author Ammar
 * @Create 2023/8/4 19:28
 */
public class _344_反转字符串 {
    public void reverseString(char[] s) {
        int n = s.length;
        for (int left = 0, right = n - 1; left < right; ++left, --right) {
            char tmp = s[left];
            s[left] = s[right];
            s[right] = tmp;
        }
    }
}
